home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / uemlsrc.arc / uemail.mss < prev    next >
Text File  |  1987-08-24  |  38KB  |  617 lines

  1.  
  2.                                    Uemail
  3.  
  4. Uemail is an emacs-like full-screen editor for the Atari-ST computer
  5. equipped with a color or monochrome monitor.  It supports all of the major
  6. commands offered by microEmacs version 30, plus some extensions that make
  7. its interface closer to that used by GNU_EMACS. Although smaller than
  8. 1ST_WORD and many GEM-based programs, uemail is a large program by TOS
  9. standards.  It was ported from a two megabyte 68K system and scaled down to
  10. fit in the small memory of a 1040ST. It requires more than 128K to load.
  11. To support shell commands, it returns 256K to the operating system at
  12. startup.  On the 68K system the shell command required only 12K of code and
  13. 128K of operating space and did not require loading a command processor to
  14. get at the operating system.  But since the ST has no command control
  15. processor, you must load a shell program such as COMMAND.PRG or
  16. PCOMMAND.PRG to get at the file system.  You may run any TOS based program
  17. from within the editor, but programs that require a GEM interface will
  18. crash the system.  You will have to exit the editor entirely to run GEM
  19. programs as there is just not enough extra memory to run GEM programs.
  20.  
  21. Running uemail from within a shell program diminishes the available text
  22. buffer space.  The return TPA command (ESC-@) reports the amount of space
  23. used and the amount available.  Long source code files (900 or more lines)
  24. are the biggest memory eaters.  If uemail runs directly from the desktop,
  25. buffer space is rarely a problem even with a 360K ramdisk loaded, but
  26. running this program and trying to edit large files on a 520ST may be a
  27. problem if ramdisks or numerous desk accessories are in memory.  Files
  28. consume approximately one and one-half times their physical size.  Text
  29. files consume a little less, and because program code often has a number of
  30. blank lines for which space must be allocated, it consumes somewhat more
  31. memory in relation to its size.
  32.  
  33. The main reason for the size of the program is the added kermit utility not
  34. usually found in a text editor, and the aliasing system for loading text
  35. files and shell programs.  The disadvantage of tying these functions into
  36. the program and using up memory space is outwayed by the advantage gained
  37. by integration.  The ability to transfer text directly into and out of an
  38. editor buffer saves time and programming effort.  The integrated program
  39. also gives the programmer a relatively easy way to implement individual
  40. protocol schemes to communicate with remote systems since all of the
  41. readaux and sendaux functions are already defined.  If the kermit section
  42. and the terminal section were to be separate from the editor, then loading
  43. those free standing programs into memory would require a larger shell space
  44. as each of those programs would be linked to its own copy of the run-time
  45. library.  Finally, the additional features make the editor more of an
  46. all-purpose tool, the type of program that can be loaded and serve as a
  47. simple shell from which to carry out most tasks on the computer.
  48.  
  49. Uemail is designed to work in tandem with GNU_EMACS on a remote computer.
  50. When the program is connected to the serial line, all of the function keys
  51. and the number pad keys send the same commands as they do from within
  52. uemail, and the defined keyboard macros (macros triggered by the accent
  53. grave key) are also sent across the line. This allows you to set up special
  54. function key definition files and macro definition files to use with a
  55. remote emacs. Macro files can be loaded into memory from within an editor
  56. buffer or while online using the terminal section.
  57.  
  58. In addition to the direct connect terminal section, uemail has a connect
  59. mode which supports kermit protocol for 7-bit transfers between two
  60. computers. This ability allows the editor to work with text from a remote
  61. system and to transfer it back to that system when done.  For remotes that
  62. do not support the kermit protocol there are log and transfer commands
  63. which use the ST's flow control (settable from within the terminal mode) to
  64. transfer text without dropping characters (provided that the remote
  65. supports one of the ST's handshaking protocols).  Because the modem I have
  66. does not support RTS/CTS, I have not been able to determine if it works as
  67. well with an RTS/CTS protocol as it does with XON/XOFF.  Uemail sets the
  68. baud rate while in connect mode.  At the beginning of the connect session,
  69. the baud rate defaults to 1200 bps, but it can be reset to 300, 2400, 9600,
  70. or 19200 bps.  When uemail exits from terminal mode, it saves the terminal
  71. screen.  When it returns to terminal mode, it rewrites that screen placing
  72. the cursor at its previous position.  You cannot set parity or stop bits
  73. from within the terminal section, if anyone finds this to be a problem, let
  74. me know, and I'll figure a way to get around it.  However, you can always
  75. run a TOS-based modem program from within uemail that can set the additional
  76. parameters.  The sample alias file shows how to define an xmodem program
  77. that will run when the CTRL-C command is given `xmodem' for a program name.
  78.  
  79. Macro commands are a quick way to automate repetitive tasks, and they also
  80. may be used to send strings, such as dial commands or logon scripts, to a
  81. modem.  The limitations of the execute macro command (CTLX-E) in many
  82. microemaxen are only one macro may be defined at a time, defining a new
  83. macro kills the old one, macros cannot be saved across editing sessions,
  84. and macros cannot be loaded from a disk file.  Uemail overcomes these
  85. limitations while retaining the "flavor" of the original define and execute
  86. macro command.  Any macro defined by the define macro command (CTLX-() may
  87. be assigned to a key on the keyboard using the getmacro command (CTLX-`)
  88. which will prompt for the key to bind.  The current keyboard macro is
  89. copied into a safe place in memory, and a pointer to it is stored in a
  90. macro table (a dynamically allocated structure).  From then on typing the
  91. accent grave (`) key followed by the key that you assigned to that macro
  92. will cause the appropriate macro to execute.  Macros can then be saved to
  93. disk, using the `-CTRL-M command, for later loading, using the `-CTRL-L
  94. command.  When the editor starts up, it attempts to load the file
  95. UEMAIL.MCR default macro file from the default drive and path.  The
  96. off-line program EXTMAC reads a macro file and writes a C-code equivalent
  97. of each function to a file.  This external program, which can be run using
  98. the shell command, replaces the old C-Mac buffer scheme in previous
  99. versions and, unlike the earlier built-in function, will create C-code for
  100. any defined macro.
  101.  
  102. Macro files may also be loaded from the terminal mode using the ALT-L
  103. command.  Macros are used in the terminal mode the same way as they are in
  104. an editor buffer (by typing a ` followed by the appropriate character).
  105. Macros are of two basic types: character strings and command strings.
  106. Character strings are words that have been typed to the screen while
  107. defining a macro.  For example from within a buffer you can type the begin
  108. macro command, type "ATDT5551234<CR>," followed by the end macro command
  109. (CTLX-)), and the getmacro command (CTLX-`), binding this string to `5.
  110. Then from the terminal section you can type `5 to send the string to your
  111. modem. Command strings are macros which would normally cause uemail to
  112. execute a series of commands (such as CTRL-A CTRL-O to go to the beginning
  113. of the line and open a blank line above it).  Command strings make the most
  114. sense when uemail is serving as a terminal connection to a remote Emacs
  115. editor, allowing you to define a set of macros that behave the same way in
  116. both editors.
  117.  
  118. As of version 33 of uemail ST, the cc command is an off-line program which
  119. runs in the space uemail returns to the operating system.  The sample
  120. start-up file (cc.ini) shows how to define an alias for CC.PRG which makes
  121. the new interface transparent.  The CC.PRG will also run by itself to drive
  122. the Alcyon compiler.  It accepts wildcards or multiple files on the command
  123. line, can compiler or simply assemble a file.  (It goes directly to the
  124. assembler for any file with an `.S' file type.)  It will link a group of